{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 上周回顾\n",
    "\n",
    "> 1. 函数的定义：def  \n",
    "> 2. 函数名的定义规则 --> 变量名一样的规则  \n",
    "> 3. 调用函数的方式  \n",
    "> 4. 参数：  \n",
    ">> 1. 形式参数（定义函数）  \n",
    ">> 2. 实际参数（调用函数）  \n",
    ">> 3. 有多个参数时：  \n",
    ">>> 1. 位置参数（调用函数时） --> 关键字参数均要放在末尾（多个不考虑顺序）  \n",
    ">>> 2. 默认参数（定义函数时） --> 默认参数均要放在末尾（多个不考虑顺序）  \n",
    "\n",
    "## 本周知识\n",
    "\n",
    "> 1. 函数的返回值\n",
    "> 2. 函数名的参数模型\n",
    "> 3. 模块与函数的关系  \n",
    "> 4. 定义一个模块，融合调用函数：\n",
    ">> 1. 调用函数\n",
    ">> 2. 调用模块中的函数"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 1. 函数的返回值\n",
    "\n",
    "> 1. 返回值的关键字：return  \n",
    "> 2. 在其他的编程语言中，一般情况下return一定要写，不写会报错；但是在python中，return可以不写，return默认为 None  \n",
    ">> 1. 编程语言中的函数，一定要有返回值；\n",
    ">> 2. 返回值的结果是一个值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_formatted_name(first_name,last_name):\n",
    "    \"\"\"返回整洁的姓名\"\"\"\n",
    "    full_name = first_name + ' '+ last_name\n",
    "    print(full_name)\n",
    "    # 函数的返回结果为 full_name\n",
    "    return full_name"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Li Hua\n",
      "None\n"
     ]
    }
   ],
   "source": [
    "print(get_formatted_name(\"Li\",\"Hua\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Li Hua\n",
      "None\n"
     ]
    }
   ],
   "source": [
    "musician = get_formatted_name(\"Li\",\"Hua\")\n",
    "print(musician)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 2. 函数的参数\n",
    "\n",
    "#### 1. 函数输入的参数\n",
    "\n",
    "> 1. 函数式可以输入复杂的参数\n",
    ">> 1. 函数参数为列表\n",
    ">> 2. 函数参数为字典\n",
    "> 2. 传递任意数量的实参\n",
    ">> 1. *args\n",
    ">>> 1. args 可以接受多个（单值）数据\n",
    ">>> 2. args 将多个数据存在一个**元组**当中，实际还是一个变量\n",
    ">> 2. ** kwargs\n",
    ">>> 1. kwargs 可以接受多个（键值对）数据\n",
    ">>> 2. kwargs 将多个键值对的数据存放在一个**字典**中，实际上还是一个变量"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "def list_test(names):\n",
    "    \"\"\"函数输入一个列表\"\"\"\n",
    "    print(names)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['Lihua', 'Ziqi', 'Xiaofeng']\n"
     ]
    }
   ],
   "source": [
    "list_test([\"Lihua\",\"Ziqi\",\"Xiaofeng\"])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "def dict_test(request_header):\n",
    "    \"\"\"函数输入一个字典\"\"\"\n",
    "    print(request_header)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "# httpbin.org/get\n",
    "httpbin_get = {\n",
    "  \"args\": {}, \n",
    "  \"headers\": {\n",
    "    \"Accept\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9\", \n",
    "    \"Accept-Encoding\": \"gzip, deflate\", \n",
    "    \"Accept-Language\": \"zh-CN,zh;q=0.9\", \n",
    "    \"Host\": \"httpbin.org\", \n",
    "    \"Upgrade-Insecure-Requests\": \"1\", \n",
    "    \"User-Agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36\", \n",
    "    \"X-Amzn-Trace-Id\": \"Root=1-61ad73cf-0a2dca9e58e1980e4a9e84d2\"\n",
    "  }, \n",
    "  \"origin\": \"61.242.54.253\", \n",
    "  \"url\": \"http://httpbin.org/get\"\n",
    "}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', 'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'zh-CN,zh;q=0.9', 'Host': 'httpbin.org', 'Upgrade-Insecure-Requests': '1', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36', 'X-Amzn-Trace-Id': 'Root=1-61ad73cf-0a2dca9e58e1980e4a9e84d2'}\n"
     ]
    }
   ],
   "source": [
    "\n",
    "dict_test(httpbin_get[\"headers\"])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "('mushroom', 'green peppers', 'extra cheese')"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 回顾元组的定义\n",
    "toopings = \"mushroom\",\"green peppers\",\"extra cheese\"\n",
    "toopings"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 传递任意数量的实参\n",
    "# args 实践：\n",
    "def make_food(food,*toppings): \n",
    "    \"\"\"打印顾客点的所有配料\"\"\"\n",
    "    return food,toopings"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [],
   "source": [
    "build_food = make_food(\"pizza\",\"mushroom\",\"green peppers\",\"extra cheese\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "('pizza', ('mushroom', 'green peppers', 'extra cheese'))"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "build_food"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [],
   "source": [
    "# **kwargs 实践\n",
    "def person(name,**info):\n",
    "    \"\"\"打印个人的信息\"\"\"\n",
    "    return name,info"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [],
   "source": [
    "build_person = person(\"Kakio\",age=\"20\",job=\"student\",address=\"NCG\",mail=\"2446343414@qq.com\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "('Kakio', {'age': '20', 'job': 'student', 'address': 'NCG', 'mail': '2446343414@qq.com'})\n"
     ]
    }
   ],
   "source": [
    "print(build_person)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 2. 函数返回的结果\n",
    "\n",
    "> 1. 函数可以返回任意类型的值，包括列表、字典和集合等较为复杂的数据结构\n",
    ">> 1. 函数返回一个集合\n",
    ">> 2. 函数返回一个字典"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 返回值为一个集合\n",
    "def search4vowels(word):\n",
    "    \"\"\"Return a boolean based on any vowels found\"\"\"\n",
    "    vowels = set('aeiou')\n",
    "    found = vowels.intersection(set(word))\n",
    "    return found"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'e', 'i', 'o', 'a'}\n"
     ]
    }
   ],
   "source": [
    "word = search4vowels('hello Zhichao')\n",
    "print(word)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 返回值为一个字典\n",
    "def build_person(name,age,job):\n",
    "    \"\"\"返回一个字典，其中包含有关一个人的信息\"\"\"\n",
    "    person = {'name':name,'age':age,'job':job}\n",
    "    return person"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'name': 'Lihua', 'age': '20', 'job': 'student'}\n"
     ]
    }
   ],
   "source": [
    "person = build_person('Lihua','20','student')\n",
    "print(person)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 3. 模块\n",
    "\n",
    "> 1. 模块 用户不需要看底层代码\n",
    "> 2. 调用模块的方法\n",
    ">> 1. 必须先调用模块，才可以使用\n",
    ">>> 1. import moudle_name 直接调用整个模块，此时模块的所有函数处于备用状态，使用方法为：  \n",
    "**moudle_name.func_name()**\n",
    ">>> 2. from moudle_name import func_name,此时仅调用模块的某一个函数，只能使用整个模块的该函数，使用方法为：  \n",
    "**func_name()**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [
    {
     "ename": "AttributeError",
     "evalue": "module 'study' has no attribute 'search4vowels'",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mAttributeError\u001b[0m                            Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-50-dc516010bcb4>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m      1\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mstudy\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 2\u001b[1;33m \u001b[0mstudy\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msearch4vowels\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'hello Kakio'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mAttributeError\u001b[0m: module 'study' has no attribute 'search4vowels'"
     ]
    }
   ],
   "source": [
    "import study\n",
    "study.search4vowels('hello Kakio')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 实践：抓取校园新闻的所有文本链接\n",
    "\n",
    "url = \"https://www.nfu.edu.cn/\"\n",
    "def news_链接(url,新闻分类,page):\n",
    "    \"\"\"抓取学校新闻的所有链接\"\"\"\n",
    "    news_链接 = []\n",
    "    for i in range(0,int(page)):\n",
    "        if i == 1:\n",
    "            index_链接 = url + 新闻分类 + '/index.html'\n",
    "            news_链接.append(index_链接)\n",
    "        else:\n",
    "            index_链接 = url + 新闻分类 + '/index' +str(i)+'.html'\n",
    "            news_链接.append(index_链接)\n",
    "            \n",
    "    return news_链接"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['heeps://www.nfu.edu.cn/xxyw/index0.html', 'heeps://www.nfu.edu.cn/xxyw/index.html', 'heeps://www.nfu.edu.cn/xxyw/index2.html', 'heeps://www.nfu.edu.cn/xxyw/index3.html', 'heeps://www.nfu.edu.cn/xxyw/index4.html', 'heeps://www.nfu.edu.cn/xxyw/index5.html', 'heeps://www.nfu.edu.cn/xxyw/index6.html', 'heeps://www.nfu.edu.cn/xxyw/index7.html', 'heeps://www.nfu.edu.cn/xxyw/index8.html', 'heeps://www.nfu.edu.cn/xxyw/index9.html', 'heeps://www.nfu.edu.cn/xxyw/index10.html', 'heeps://www.nfu.edu.cn/xxyw/index11.html', 'heeps://www.nfu.edu.cn/xxyw/index12.html', 'heeps://www.nfu.edu.cn/xxyw/index13.html', 'heeps://www.nfu.edu.cn/xxyw/index14.html', 'heeps://www.nfu.edu.cn/xxyw/index15.html', 'heeps://www.nfu.edu.cn/xxyw/index16.html', 'heeps://www.nfu.edu.cn/xxyw/index17.html', 'heeps://www.nfu.edu.cn/xxyw/index18.html', 'heeps://www.nfu.edu.cn/xxyw/index19.html', 'heeps://www.nfu.edu.cn/xxyw/index20.html', 'heeps://www.nfu.edu.cn/xxyw/index21.html', 'heeps://www.nfu.edu.cn/xxyw/index22.html', 'heeps://www.nfu.edu.cn/xxyw/index23.html', 'heeps://www.nfu.edu.cn/xxyw/index24.html', 'heeps://www.nfu.edu.cn/xxyw/index25.html', 'heeps://www.nfu.edu.cn/xxyw/index26.html', 'heeps://www.nfu.edu.cn/xxyw/index27.html', 'heeps://www.nfu.edu.cn/xxyw/index28.html', 'heeps://www.nfu.edu.cn/xxyw/index29.html', 'heeps://www.nfu.edu.cn/xxyw/index30.html', 'heeps://www.nfu.edu.cn/xxyw/index31.html', 'heeps://www.nfu.edu.cn/xxyw/index32.html', 'heeps://www.nfu.edu.cn/xxyw/index33.html', 'heeps://www.nfu.edu.cn/xxyw/index34.html', 'heeps://www.nfu.edu.cn/xxyw/index35.html', 'heeps://www.nfu.edu.cn/xxyw/index36.html', 'heeps://www.nfu.edu.cn/xxyw/index37.html', 'heeps://www.nfu.edu.cn/xxyw/index38.html', 'heeps://www.nfu.edu.cn/xxyw/index39.html', 'heeps://www.nfu.edu.cn/xxyw/index40.html', 'heeps://www.nfu.edu.cn/xxyw/index41.html', 'heeps://www.nfu.edu.cn/xxyw/index42.html', 'heeps://www.nfu.edu.cn/xxyw/index43.html', 'heeps://www.nfu.edu.cn/xxyw/index44.html', 'heeps://www.nfu.edu.cn/xxyw/index45.html', 'heeps://www.nfu.edu.cn/xxyw/index46.html', 'heeps://www.nfu.edu.cn/xxyw/index47.html', 'heeps://www.nfu.edu.cn/xxyw/index48.html', 'heeps://www.nfu.edu.cn/xxyw/index49.html', 'heeps://www.nfu.edu.cn/xxyw/index50.html', 'heeps://www.nfu.edu.cn/xxyw/index51.html', 'heeps://www.nfu.edu.cn/xxyw/index52.html', 'heeps://www.nfu.edu.cn/xxyw/index53.html', 'heeps://www.nfu.edu.cn/xxyw/index54.html', 'heeps://www.nfu.edu.cn/xxyw/index55.html', 'heeps://www.nfu.edu.cn/xxyw/index56.html', 'heeps://www.nfu.edu.cn/xxyw/index57.html', 'heeps://www.nfu.edu.cn/xxyw/index58.html', 'heeps://www.nfu.edu.cn/xxyw/index59.html', 'heeps://www.nfu.edu.cn/xxyw/index60.html', 'heeps://www.nfu.edu.cn/xxyw/index61.html', 'heeps://www.nfu.edu.cn/xxyw/index62.html', 'heeps://www.nfu.edu.cn/xxyw/index63.html', 'heeps://www.nfu.edu.cn/xxyw/index64.html', 'heeps://www.nfu.edu.cn/xxyw/index65.html', 'heeps://www.nfu.edu.cn/xxyw/index66.html', 'heeps://www.nfu.edu.cn/xxyw/index67.html', 'heeps://www.nfu.edu.cn/xxyw/index68.html', 'heeps://www.nfu.edu.cn/xxyw/index69.html', 'heeps://www.nfu.edu.cn/xxyw/index70.html', 'heeps://www.nfu.edu.cn/xxyw/index71.html', 'heeps://www.nfu.edu.cn/xxyw/index72.html', 'heeps://www.nfu.edu.cn/xxyw/index73.html', 'heeps://www.nfu.edu.cn/xxyw/index74.html', 'heeps://www.nfu.edu.cn/xxyw/index75.html', 'heeps://www.nfu.edu.cn/xxyw/index76.html', 'heeps://www.nfu.edu.cn/xxyw/index77.html', 'heeps://www.nfu.edu.cn/xxyw/index78.html', 'heeps://www.nfu.edu.cn/xxyw/index79.html', 'heeps://www.nfu.edu.cn/xxyw/index80.html', 'heeps://www.nfu.edu.cn/xxyw/index81.html', 'heeps://www.nfu.edu.cn/xxyw/index82.html', 'heeps://www.nfu.edu.cn/xxyw/index83.html', 'heeps://www.nfu.edu.cn/xxyw/index84.html', 'heeps://www.nfu.edu.cn/xxyw/index85.html', 'heeps://www.nfu.edu.cn/xxyw/index86.html', 'heeps://www.nfu.edu.cn/xxyw/index87.html', 'heeps://www.nfu.edu.cn/xxyw/index88.html', 'heeps://www.nfu.edu.cn/xxyw/index89.html', 'heeps://www.nfu.edu.cn/xxyw/index90.html', 'heeps://www.nfu.edu.cn/xxyw/index91.html', 'heeps://www.nfu.edu.cn/xxyw/index92.html', 'heeps://www.nfu.edu.cn/xxyw/index93.html', 'heeps://www.nfu.edu.cn/xxyw/index94.html', 'heeps://www.nfu.edu.cn/xxyw/index95.html', 'heeps://www.nfu.edu.cn/xxyw/index96.html', 'heeps://www.nfu.edu.cn/xxyw/index97.html']\n"
     ]
    }
   ],
   "source": [
    "# 使用者只需要提供：url链接，学校分类的简称，页码\n",
    "result = news_链接('heeps://www.nfu.edu.cn/','xxyw','98')\n",
    "print(result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['heeps://www.nfu.edu.cn/xydt/index0.html', 'heeps://www.nfu.edu.cn/xydt/index.html', 'heeps://www.nfu.edu.cn/xydt/index2.html', 'heeps://www.nfu.edu.cn/xydt/index3.html', 'heeps://www.nfu.edu.cn/xydt/index4.html', 'heeps://www.nfu.edu.cn/xydt/index5.html', 'heeps://www.nfu.edu.cn/xydt/index6.html', 'heeps://www.nfu.edu.cn/xydt/index7.html', 'heeps://www.nfu.edu.cn/xydt/index8.html', 'heeps://www.nfu.edu.cn/xydt/index9.html', 'heeps://www.nfu.edu.cn/xydt/index10.html', 'heeps://www.nfu.edu.cn/xydt/index11.html', 'heeps://www.nfu.edu.cn/xydt/index12.html', 'heeps://www.nfu.edu.cn/xydt/index13.html', 'heeps://www.nfu.edu.cn/xydt/index14.html', 'heeps://www.nfu.edu.cn/xydt/index15.html', 'heeps://www.nfu.edu.cn/xydt/index16.html', 'heeps://www.nfu.edu.cn/xydt/index17.html', 'heeps://www.nfu.edu.cn/xydt/index18.html', 'heeps://www.nfu.edu.cn/xydt/index19.html', 'heeps://www.nfu.edu.cn/xydt/index20.html', 'heeps://www.nfu.edu.cn/xydt/index21.html', 'heeps://www.nfu.edu.cn/xydt/index22.html', 'heeps://www.nfu.edu.cn/xydt/index23.html', 'heeps://www.nfu.edu.cn/xydt/index24.html', 'heeps://www.nfu.edu.cn/xydt/index25.html', 'heeps://www.nfu.edu.cn/xydt/index26.html', 'heeps://www.nfu.edu.cn/xydt/index27.html', 'heeps://www.nfu.edu.cn/xydt/index28.html', 'heeps://www.nfu.edu.cn/xydt/index29.html', 'heeps://www.nfu.edu.cn/xydt/index30.html', 'heeps://www.nfu.edu.cn/xydt/index31.html', 'heeps://www.nfu.edu.cn/xydt/index32.html', 'heeps://www.nfu.edu.cn/xydt/index33.html', 'heeps://www.nfu.edu.cn/xydt/index34.html', 'heeps://www.nfu.edu.cn/xydt/index35.html', 'heeps://www.nfu.edu.cn/xydt/index36.html', 'heeps://www.nfu.edu.cn/xydt/index37.html', 'heeps://www.nfu.edu.cn/xydt/index38.html', 'heeps://www.nfu.edu.cn/xydt/index39.html', 'heeps://www.nfu.edu.cn/xydt/index40.html', 'heeps://www.nfu.edu.cn/xydt/index41.html', 'heeps://www.nfu.edu.cn/xydt/index42.html', 'heeps://www.nfu.edu.cn/xydt/index43.html', 'heeps://www.nfu.edu.cn/xydt/index44.html', 'heeps://www.nfu.edu.cn/xydt/index45.html', 'heeps://www.nfu.edu.cn/xydt/index46.html', 'heeps://www.nfu.edu.cn/xydt/index47.html', 'heeps://www.nfu.edu.cn/xydt/index48.html', 'heeps://www.nfu.edu.cn/xydt/index49.html', 'heeps://www.nfu.edu.cn/xydt/index50.html', 'heeps://www.nfu.edu.cn/xydt/index51.html', 'heeps://www.nfu.edu.cn/xydt/index52.html', 'heeps://www.nfu.edu.cn/xydt/index53.html', 'heeps://www.nfu.edu.cn/xydt/index54.html', 'heeps://www.nfu.edu.cn/xydt/index55.html', 'heeps://www.nfu.edu.cn/xydt/index56.html', 'heeps://www.nfu.edu.cn/xydt/index57.html', 'heeps://www.nfu.edu.cn/xydt/index58.html', 'heeps://www.nfu.edu.cn/xydt/index59.html', 'heeps://www.nfu.edu.cn/xydt/index60.html', 'heeps://www.nfu.edu.cn/xydt/index61.html', 'heeps://www.nfu.edu.cn/xydt/index62.html', 'heeps://www.nfu.edu.cn/xydt/index63.html', 'heeps://www.nfu.edu.cn/xydt/index64.html', 'heeps://www.nfu.edu.cn/xydt/index65.html', 'heeps://www.nfu.edu.cn/xydt/index66.html', 'heeps://www.nfu.edu.cn/xydt/index67.html', 'heeps://www.nfu.edu.cn/xydt/index68.html', 'heeps://www.nfu.edu.cn/xydt/index69.html', 'heeps://www.nfu.edu.cn/xydt/index70.html', 'heeps://www.nfu.edu.cn/xydt/index71.html', 'heeps://www.nfu.edu.cn/xydt/index72.html', 'heeps://www.nfu.edu.cn/xydt/index73.html', 'heeps://www.nfu.edu.cn/xydt/index74.html', 'heeps://www.nfu.edu.cn/xydt/index75.html', 'heeps://www.nfu.edu.cn/xydt/index76.html', 'heeps://www.nfu.edu.cn/xydt/index77.html', 'heeps://www.nfu.edu.cn/xydt/index78.html', 'heeps://www.nfu.edu.cn/xydt/index79.html', 'heeps://www.nfu.edu.cn/xydt/index80.html', 'heeps://www.nfu.edu.cn/xydt/index81.html', 'heeps://www.nfu.edu.cn/xydt/index82.html', 'heeps://www.nfu.edu.cn/xydt/index83.html', 'heeps://www.nfu.edu.cn/xydt/index84.html', 'heeps://www.nfu.edu.cn/xydt/index85.html', 'heeps://www.nfu.edu.cn/xydt/index86.html', 'heeps://www.nfu.edu.cn/xydt/index87.html', 'heeps://www.nfu.edu.cn/xydt/index88.html', 'heeps://www.nfu.edu.cn/xydt/index89.html', 'heeps://www.nfu.edu.cn/xydt/index90.html', 'heeps://www.nfu.edu.cn/xydt/index91.html', 'heeps://www.nfu.edu.cn/xydt/index92.html', 'heeps://www.nfu.edu.cn/xydt/index93.html', 'heeps://www.nfu.edu.cn/xydt/index94.html', 'heeps://www.nfu.edu.cn/xydt/index95.html']\n"
     ]
    }
   ],
   "source": [
    "校园动态_result = news_链接('heeps://www.nfu.edu.cn/','xydt','96')\n",
    "print(校园动态_result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
